<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>mustache</title>
</head>

<body>
  <div id="dom"></div>
  <script>
    var list = document.getElementById('dom')
    var arr = [
      {
        name: '张三',
        age: 12,
        sex: '男'
      }, {
        name: '李四',
        age: 15,
        sex: '女'
      }
    ]
    for (let i = 0; i < arr.length; i++) {
      list.innerHTML += [
        '<li>',
        '<div>' + arr[i].name + '</div>',
        '<div>' + arr[i].age + '</div>',
        '<div>' + arr[i].sex + '</div>',
        '</li>'
      ].join('')
    }
  </script>
</body>

</html>